function stop() {
    return false;
}
document.oncontextmenu = stop;
$('#loginBtn').click(function(){
    var loginName = $('input[name=loginName]').val();
    var password = $('input[name=password]').val();
    if(loginName==""||password==""){
        layer.msg("请输入登录名或密码！")
    }else {
        $.ajax({
            url: '' + '/sys-user/login',
            method: 'POST',
            contentType: 'application/json',
            data: JSON.stringify({
                loginName: loginName,
                password: password
            }),
            success: function(res) {
                if (res.code != 200) {
                    layer.alert(res.msg);
                } else {
                    sessionStorage.setItem('loginName',res.data.loginName)
                    location.href = '/toHRIndex';
                }
            }
        })
    }
})